package pc29;

import java.util.Scanner;

public class J15Ch05Calculator {
	public static void main(String[] args) {
		int a;
		int b;
		String c = "";
		Scanner sc = new Scanner(System.in);

		System.out.println("두 정수와 연산자를 입력");
		a = sc.nextInt();
		b = sc.nextInt();
		c = sc.next();
		sc.close();

		setValue value = new setValue();
		value.setA(a);
		value.setB(b);

		calculate cal = new calculate();

		switch (c) {
		case "+":
			System.out.println(cal.add(a, b));
			break;
		case "-":
			System.out.println(cal.sub(a, b));
			break;
		case "*":
			System.out.println(cal.mul(a, b));
			break;
		case "/":
			System.out.println(cal.div(a, b));
			break;
		default:
			break;

		}

	}
}

class setValue {

	private int a;
	private int b;

	public void setA(int a) {
		this.a = a;
	}

	public int getA() {
		return a;
	}

	public int getB() {
		return b;
	}

	public void setB(int b) {
		this.b = b;
	}

}

class calculate extends setValue {

	public int add(int a, int b) {
		return a + b;
	}

	public int sub(int a, int b) {
		return a - b;
	}

	public int mul(int a, int b) {
		return a * b;
	}

	public int div(int a, int b) {
		return a / b;
	}

}
/*
 * claa setValue{ private int a;private int b; public void setValue(int a,int
 * b){ public int calculate(){ public int getA(){return a;} public int
 * getB(){return b;} } }
 * 
 * class J15Add extends J15Cal{ public int calculate(){ return getA()+getB(); }
 * } class J15Sub extends J15Cal{ public int calculate(){ return getA()-getB();
 * } } class J15Mul extends J15Cal{ public int calculate(){ return
 * getA()*getB(); } } class J15Div extends J15Cal{ public int calculate(){
 * return getA()/getB(); } }
 */

